package main

import "fmt"

type notifier interface {
	notfiy()
}
type user struct {
	name  string
	email string
}

func (u *user) notfiy() {
	fmt.Printf("Sending user email to %s<%s>\n",
		u.name,
		u.email)
}
func main() {
	u := user{name: "sin", email: "sin@qq.com"}
	sendNotification(&u)
}
func sendNotification(n notifier) {
	n.notfiy()
}
